// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
// import App from './App'
import Layout from './components/layout'
import VueRouter from 'vue-router'
import VueResource from 'vue-resource'
import indexPage from './page/index'
import detaliPage from './page/detali'
import regPage from './page/reg'
import detaliAnaPage from './page/detali/analysis'
import detaliCouPage from './page/detali/count'
import detaliForPage from './page/detali/forecast'
import detaliPubPage from './page/detali/publish'





Vue.use(VueRouter)
Vue.use(VueResource)
let router = new VueRouter({
  mode:'history',
  routes:[
    {path:'/',component:indexPage},
    {
      path:'/detali',
      component:detaliPage,
      redirect:'/detali/analysis',
      children:[
        {path:'analysis',component:detaliAnaPage},
        {path:'count',component:detaliCouPage},
        {path:'forecast',component:detaliForPage},
        {path:'publish',component:detaliPubPage},
      ]
    },
    {path:'/reg',component:regPage},
  ]
})

/* eslint-disable no-new */
new Vue({
  router,
  el: '#app',
  template: '<Layout/>',
  components: { Layout }
})
